Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(routing): Remove backwards compatibility for the routing crate #3015

Merged
merged 36 commits into from
Jul 18, 2024

Conversation

Aprabhat19
Copy link
Contributor

@Aprabhat19 Aprabhat19 commented Nov 29, 2023

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Remove the feature flags that were added for providing support for backwards compatibility.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

This PR cannot be tested as it removes the support for backwards compatibility. A sanity for routing must be done.

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@Aprabhat19 Aprabhat19 added S-waiting-on-review Status: This PR has been implemented and needs to be reviewed C-refactor Category: Refactor A-routing Area: Routing labels Nov 29, 2023
@Aprabhat19 Aprabhat19 requested a review from vspecky November 29, 2023 18:06
@Aprabhat19 Aprabhat19 self-assigned this Nov 29, 2023
@Aprabhat19 Aprabhat19 requested review from a team as code owners November 29, 2023 18:06
@Aprabhat19 Aprabhat19 linked an issue Jul 17, 2024 that may be closed by this pull request
2 tasks
Comment on lines 168 to 185
pub enum RoutableChoiceKind {
OnlyConnector,
FullStruct,
}

#[cfg(feature = "connector_choice_bcompat")]
#[derive(Debug, serde::Deserialize, serde::Serialize)]
#[serde(untagged)]
pub enum RoutableChoiceSerde {
OnlyConnector(Box<RoutableConnectors>),
FullStruct {
connector: RoutableConnectors,
#[cfg(feature = "connector_choice_mca_id")]
merchant_connector_id: Option<String>,
#[cfg(not(feature = "connector_choice_mca_id"))]
sub_label: Option<String>,
},
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need support for both types of data (OnlyConnector & FullStruct), as per our current standing. We may take a call to remove support for OnlyConnector in the future, but that will most probably require DB migrations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove these fields and open a separate PR

@Aprabhat19 Aprabhat19 requested a review from vspecky July 17, 2024 12:21
@Aprabhat19 Aprabhat19 requested a review from SanchithHegde July 17, 2024 13:11
SanchithHegde
SanchithHegde previously approved these changes Jul 17, 2024
vspecky
vspecky previously approved these changes Jul 18, 2024
Copy link
Member

@vspecky vspecky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

crates/router/src/core/payments.rs Outdated Show resolved Hide resolved
@Aprabhat19 Aprabhat19 dismissed stale reviews from vspecky and SanchithHegde via 56a40b5 July 18, 2024 07:51
Copy link
Member

@vspecky vspecky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@likhinbopanna likhinbopanna added this pull request to the merge queue Jul 18, 2024
Merged via the queue into main with commit 78a7804 Jul 18, 2024
19 of 21 checks passed
@likhinbopanna likhinbopanna deleted the rmove-backwards-compat branch July 18, 2024 10:07
@pixincreate pixincreate removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Jul 19, 2024
pixincreate added a commit that referenced this pull request Jul 19, 2024
* 'main' of github.com:juspay/hyperswitch: (26 commits)
  refactor(core): change primary keys in user, user_roles and roles tables (#5374)
  chore(version): 2024.07.19.1
  refactor(connector): make the `original_authorized_amount` optional for MITs with `connector_mandate_details` (#5311)
  feat(connector): Plaid connector Integration (#3952)
  feat: encryption service integration to support batch encryption and decryption (#5164)
  refactor(core): change primary key of refund table (#5367)
  chore(version): 2024.07.19.0
  chore(postman): update Postman collection files
  Docs: Updating Error codes for documentation purposes (#5314)
  fix(core): [payouts] failure of payout retrieve when token is expired (#5362)
  build: remove unused dependencies (#5343)
  refactor(blocklist): change primary key of blocklist table (#5356)
  chore: Increasing log coverage for payment method list (#5042)
  refactor(routing): Remove backwards compatibility for the routing crate (#3015)
  refactor(merchant_account): change primary key for merchant account (#5327)
  refactor(router): remove id dependency from merchant connector account, dispute and mandate (#5330)
  feat(connector): [Itau Bank] Template for payment flows (#5304)
  chore(version): 2024.07.18.0
  refactor(router): Remove the locker call in the psync flow (#5348)
  feat(router): Add support for passing the domain dynamically in the session call (#5347)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-routing Area: Routing C-refactor Category: Refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Refactor] Remove backwards compatibility of the routing crate
7 participants